<?php

class TeamModel extends Model
{

    public function findTeam($id)
    {

        $sql  = "select * from team where `id`=" . $id;
        $team = static::$db->query($sql);
        return $team[0]['team'];

    }
    public function playerCount($id)
    {

        $sql   = "select count(*) as a from player where `tid`=$id";
        $count = static::$db->query($sql);
        return $count[0][a];
    }

    public function getPlayers($id)
    {
        ;

        $sql    = "select * from player where `tid`=$id";
        $player = static::$db->query($sql);
        return $player;
    }

}
